Fix issue with invalid animation checking