Fixed shutdown in task 4