bugfix for POSIX method.