Changes to make it run in cygwin