enhance g-issue#21 fix further. Previous fix only works for chrome.

Now tested on latest Firefox and IE11, they both worked as well