fixed POSIX incompatible problems