Update controller.cpp

corrected some errors in my code