Fix modal behavior.