fixed some cloning issues