fixed bug in sequencing of animate() commands