Move fading animation out of the loop