[api] fix a minor bug