Added underflow check to int parsing routine