fixed bugs with Var.met