Fixed UpdateStatistics to support build without items.