Fix null reference on callbacks.