Fix bug 1030 forcing to wait taskIds