fix listen loop