bugfix in copy function -- we need to copy the callback data too