fixed bug which could caused wrong stoichiometry in case of substitution