Fixed another small bug which caused the thread sending stats to crash