Added simple bounds checking, so the animation now loops nicely