fixing posix print bug