Fixed some bugs related to the update in FEniCS and changed h to N.