Fixed crash when wifi disabled