lpt - minor changes to make work on windows