Fix http connection closing