Fixed a potential Asynchronity bug (if tasks.Count is 0 i could be 0)