Fixed IE8 errors
Merge pull request #7 from diluno/master

Fixes IE8 JS errors