Fix bug caused by empty path var.