fix stale queue condition