specalg-sorts: Fixed a bug related to async calls

Same as the ealier commit.