Added cloning of primitives