I have no idea whether it is avast or windows that is at fault but it does sometimes work

Surely if it was shoddy coding it would not work period