Fix error in quit and warning