Fix compilation and add print of DoFs