Prevent flickering on iOS