fixed 2 missing requires in api.js