output buffer fix