Fix some scanner bug