fix undefined var.