Fixes some animation stopping issues.