Cloning function not working

This is what happens.