Fixed incorrect behaviour at IE.