Fix undefined function in example