fixed a few bugs in dependency of tasks