Fix end condition being put on queue early.