fixing console error