Hiding the modal on structure pattern