class fixed in copy function