fixed missing crash on optional callbacks