do not crash on multiple Close()