Fixed incorrect time management in animations