Offline detection fix