critical bug fixed when updating internal dofs numbers