Change the direct speech into the reported speech.
"I was waiting for the bus when he arrived."
I know that:
past continuous –> past perfect continuous
past simple –> past perfect
Then the transformed sentence is "I said that I had been waiting for the bus when he had arrived."
But this sentence seems wrong to me. It seems that the first action is "he had arrived" and then "I had been waiting for the bus".
Is it really correct?
Thank you in advance.