Fixed connection close problem due to merge