Fixed bug encounted when testing under Windows/Cygwin