Fix NPE for wifi networks