Minor fix to exit()