Fixing Syntax error in controller