fix that destructor could cause paint event