fix missing callback bug, remove console.logs