fixed a error in api's helper