fixed bug in collection time calculation