fixed version substitution bug