fix bug: set inner buffer limit