Fixed wrong usages of console (bugfix for IE)