Fix IE and FF compatibility