fixed data collection tst function bug