fix console error