Looks like you've changed the implementation of createRowStream.  That looks a bit messy, but it probably avoids the problem commented above.