Fixed bug with controller