Fixed PlayLoopedAnimation function.