corrected closeModalOnClick assignment