Fixes to properly support iOS