fix a bug for missing callback when reg