Fixed a bug with docs in api.js