Fixed bug in object cloning.