fix the conditinal bug to determine the user whether want to quit