setAutoflush refactor for clarity