Small bugs fixed in controllers.py