fix clone issue
added test for clone