fixed about POSIX regulation, and some improvements