fixed a bug which would be produced when the receiveBufferSize is very small