fixed problem with running tasks