fix for crash in IE8
Merge pull request #37 from cmer/master

Fix crash in IE8