fix generation of controller