Fixed issue where isNetWorkAvailable was using the wrong context