This fixes some strange behavoiur on old browsers.

Specifically IE :D