close modal on any page transition