Fix main sliding and overlay for safari