fixed the copying problems