fixed bug preventing reset conditions for certain edge cases