Fixing logical error on the count of the accidents in the patches