fix of input buffering