Tarantino rewrote `Django Unchained` ending at last minute

London: Director Quentin Tarantino rewrote the ending of `Django Unchained` at the last minute after realising that his planned finale wasn`t going to work.

The film`s lead star, Jamie Foxx said the director decided at the spur of the moment that the finale he had planned for the movie was not the same as he has visualised it, reported Aceshowbiz.

"On the spur of the moment, he rewrote the end of the movie. Blows up the house and says, `My ending doesn`t work.` We`re like, `What are you going to do?` `Just give me a second.`

"He`s walking on the rubble like this, `Okay, I got it.` Goes to his trailer and comes back with the ending of the movie, but dope. When a writer writes a movie, he goes into his cabin and he`s there for like nine months, and comes down with like the tablets. This dude just went in his trailer," Foxx said.

The actor, who plays the titular character in the film, says the filmmaker is God-gifted.

"What it is that there`s talented people and God gifted people. He`s a God gifted people because he went away, he did something, you could tell that it was trouble. When he got it, he came and was like, `I got this now.`