Wifi Timer on Galaxy S5 does not end Wifi

I am using Galaxy S5 that has been updated to Marshmallow (6.0.1)
I setup Wifi Timer to start and end the Wifi at certain times.
The problem is that it sometimes does not end the Wifi at the set time.
Any help or hint to fix the problem will be highly appreciated.