Fix type-mismatching bug within Scanner.l