save num_scalars (oops)