fixed for posix compliance so it works cross os