fix issue that after scan finishes connection is not closed