Fix issues that prevented app from terminating on end-of-file and detecting parse errors for single-character word inputs