fix to work on cygwin