loop bug in animation class