fixing error in single controller