Fix modal cleanup