Add a comment to explain the wait logic