fix bug for enable_progress=False