changed shutdown to add awaitTermination