Overlay close bug fix