Fixed issue of when elementWise=true no matter which element was chosen to be scaled, always the element with index=0 was replaced. This element was replaced with a value of scaled element with a correct index.
Fixed issue of when elementWise=true no matter which element was chosen to be scaled, always the element with index=0 was replaced. This element was replaced with a value of scaled element with a correct index.

Anaphory/beast2,CompEvol/beast2,Anaphory/beast2,tgvaughan/beast2,CompEvol/beast2,Anaphory/beast2,CompEvol/beast2,tgvaughan/beast2,tgvaughan/beast2,CompEvol/beast2,Anaphory/beast2,tgvaughan/beast2