fix null pointer for stats in document info