api_controller bug fixed