fixed closeOverlay method