Htc one m8 not picking Wi-Fi

I just updated my htc one m8 to the new android OS 5.0.1 and I am having a problem with my Wi-Fi connection. I have a saved home connection and whenever it goes out of range, the Wi-Fi does not get back-on. I am having this problem for a few days, can anyone help me with this?
