fix api mystery crash
Merge pull request #2334 from luto/api-mystery-crash

fix api mystery crash