Fixed bug with undesired Var sharing