Fixed an infinite loop

Check integers was getting stuck because scanner was not advancing to
the next line.