Overlay appears and disappears correctly