safe callback calling