More onClose bugs