If the counter goes over 100% of the MAX then it will fail

I made a quick fix to this problem