fixed the controller