Fix errors related to the quit reason