Fix bug bounded with unordered task creation