Using global leaflet switch - fix to safari