fixed a few more POSIX issues