make more consistent 0/1 instead of occasional -1
not actually off-by-one; stack has one more space than it needs