fixed buggy callback calling from new offline-aware code