Fixed some errors. Still not sure why clone fails.