fixed a couple of bugs in substitute method of FromCharCodePredicate and ToStringPredicate