The novel is a time travel story, which I hope will turn out to be the start of a series. Time travel is tricky and confusing to write about and can make your brain go all squishy.
I like to have the end of the book decided before I start writing, and I've just realized I have to change it since it would fall foul of the grandfather paradox and my clever readers would notice.
It's not the first time I've changed the end of a novel at the last minute. I could see that the ending I'd planned for Replica was going to be predictable and possibly a bit dull, so I spent three weeks furiously mulling over alternatives. A few readers hate the ending I came up with, though I find it entirely satisfying. Most are taken by surprise - this may be an incidental advantage of changing the end well into writing the book.
Back to work. That ending won't write itself. Now, if only I had a time machine, I could whiz into the future and bring a copy back here and save myself a lot of effort...