Minor changes to work on iOS