Fixed bug with final task and dependence