Remove bugs in adhoc scheduling.