Fix some edge cases with commiting and reseting