Fixed exit on IOS