added patches for networkonmainthread exception