fixed a new bug in API