Fix the NullPointerExcepton when using InfoDocument class.