Merge "Revert logic to unregister callback in the background thread" into main