Cleaned and optimized the sprite fix.