Fix bug on decrement to 0 for MILD.
Add test case for reset and decrement.