Fix used of undefined function