Fixing the error in the finite difference setup