Fixed some errors with print and lexing terminals.