fixed bug with stats_to_do and results array - closing the channel on completion