event in modal.fixes#365