Default WIFI Issue

Hi everyone,

so i just recently set my phone back to stock and installed all of the OTA updates from t-mobile. But now I have a wifi issue. Whenever I turn WIFI on, airplane mode automatically goes on and I lose signal, but WIFI will still be functional. I know there was a simple fix for this before because I encountered this the first time I rooted my phone but I dont remember what it was, and I tried searching posts for it.

Any help is appreciated. Thanks in advance