Fixed gracefully handling of cloning errors.