Fixed bug causing animation repeat and reverse to not always work.