Fix race condition in Close()