Fixed a bug on the main slide in safari