This fixes some strange behavoiur on old browsers.

Especially IE.