Fixed modulo bug in animator.