Fixed the scanner for character variables

Fixed