Fix broken build due to badly handling futures.
Merge pull request #313 from Icenium/totev/missing-waits

Fix broken build due to badly handling futures.