Fix warning exit function