compatible with ie11. Fixes #514