Added some code for substitution in inds.