Fix NPE in removing stats