fixing optional callbacks in docs