trying to make the animations work better in safari