a bug in exit fixed