fix #24
Merge remote-tracking branch 'kazuho/issues/shrink-input-buffer' into develop