Moved the zeroing of the end of the input buffer to where it should be