Fixed "Pool did not terminate" error on server/webapp shutdown