Fixed undefined function error.