Fixed IE11 JS errors

Closes issue #1022.
Thanks to mattlee78 for pointing this out.
Merge pull request #1023 from CounterPillow/fix-for-pleb-browser

Fixed IE11 JS errors