fixed typo on api.js line 695