fixed bug in my controller