Fix modal problems