Fixing broken code when setting page title