Bug fixed

Some errors fixed which occured because of jshint "console not defined"
issue.