Fix modal hide/show.