buffering problem under MacOS fixed (attempt 2)