Fix JLD dump (and define length while at it)