fix a bug in refactored LarsonScanner