Fix null wifi bug and reformat for conventions
Fix loadingDialog illegalArgumentException