fix a bug in OS stat collecting