fix bug which showed up in cygwin