Fixed bug in create_controller