Fixed logic error to quit game