Fix color animation on the cache canvas and Fix error in firefox