Fixed animation on Safari

Also other minor bug fixes