Fix alternating for iOS safari