Fix animation bug.
Update inactivity detection.