Fix console errors regarding API