Fix error with getdiff functions