Fixed bug with dependent tasks