Fixed server connection closing