Fix firefox glitching problem