Wait for everything to finish before continue