try to fix of shutdown procedure to execute all tasks submitted before shutdown() call