bugfix: return number of bytes we have processed.