sorted the weird issues where Close() wouldn't return