Fix path not defined, and the function name