Fix the Firefox animation flash bug