Cloning improvements

This change improves the cloning behavior