Data should fire as many times as there are chunks.  I belive this is what was causing the unexpected end of input.