fix NULL callback crash