fix nil callback issue