Fix undefined variable