Better compatibility

To do: fix for IE :(