fixed bug in exit