fixed a crash if trying to upload with wifi off