fixing replace and vartree issues