Fixed incorrect exit