CAS-1296: updated copyFrom and toString