bug fixing in old var management