Fix dimensionality problem in valgradhess