bug fixes in the posix loop.