Fixed extra sys.exit