improved printing, fixed off-by-blocklen error