bugfix for tasks ordering in doing