Fixed IE8 bug: removed reference to console because IE8 does not support it.