fix error with lost click events on popup