Hello it's me again

I have a question about reported speech.
This is in direct speech: I was waiting for the bus when he arrived.
And that sentence I change in this: She told me that she had been waiting for the bus when he arrived.
And then I checked in solution but there was different. There was written the same as in direct speech.
And now I don't know what is correct.
Thanks for help