Fixing console error