Fixing NPE in during client pool shutdown