fix in normalize function, support final vars