fixed more of the controller.py