Added #decrement and fixed bug causing last value to be skipped