Fixed

Fixed print statements and the cases where next() isn’t supposed to be
called —>system.exit(1)