bugfix in Animation class