[api] fix a small bug