fix avloop exit when there is still idle job pending