Fix copy implementation