This patch should fix the undefined issue.