Fix undefined callback function error.