fix bug in discardTasksExcept() that broke forkProcess