fix write length reporting

Signed-off-by: Max Brunsfeld <mbrunsfeld@pivotallabs.com>