fix console errors