fix broken copying