prevent wierd error during exit