fixed small bug on api handler