remove underflow bug
small cleanup