Fix never close the connection