Fix modal to close on save.