fixes to text-viewer demo for MS-Windows