Fixed var replacing, added getVars

Fixed var replacing, added getVars