substring clone method fix.