Fix callback code for case when callback is missing