People assume the word "immediately" means "instantly after" but it doesn't. It seems to mean something like "the next event of interest to the story". Thus, there may be intervening events and activities, but they are not of interest for the flow of ideas in the story at hand. It would be similar to the phrase, "meanwhile, back at the ranch".