fixed EXIT bug