fixed a quit bug
fixed a mistake from a refactor