fix to work on both unix and windows