fix firefox animate bug