fixes to iOS bugs