fixing syntax error in controller