fix a bug in os stat collecting