rid bugs in controllers