fixing syntax error in chat controller