Fixing error when page was a string