Fix computation of DOF with new plot functionality