Remove wait loop from example