Hello!

«That was the last time John I spoke»

I listened to this sentence in a film (subtitled) and I think that the order is not correct. I write:
«That was the last time I spoke to Jonh». Are right the two sentences?

Thank you!