fixing output buffer minor bug on session