api, fix bug