Fix store/restore of dimensions