Some fixes for iOS