Fix crashes when wifi and bluetooth are off