V5.6- Resolved Github Issue

Resolved #251, #253
Changes in few lines of code to make it work in IE8