Thank you for the help.
There must have been some bug. I tried the helper function before and it didn't work. Now it seems to be working.