Fixed hang problem in ~TableScanner on scanner errors