fixed bug with controller