What told you that avast was switched off?
If it was/is the security center from Windows, it is a known bug in the windows security center.

What programs did you remove and installed again and how?

Do you have any other security software installed and if so which one(s) ?