made changes to fix the correctness issue in versions 1 and 2. Dont let inputQueueSize to become 0 while changingBufferSize