Fixed bug in controller loading