#25 fixed another issue with ajax call to api.js