Fail fast when input Buffer is empty #37