Fixed bug that agents did not queue