pulling in bugfix from api-js