Fix undefined variable error.