Connection closed fix