Fix server connection leaks