Fix modal problems on iOS