fixes issues with console and IE9
Merge pull request #288 from daeks/ie9

fixes issues with console and IE9