fixed error in api control