fix lexing for invalid base characters