Fix npe for callbacks.