Animation fixes for Safari and Firefox