Merge "Fixed NPE when wifi is turned off." into nyc-dev