In Shakespeare's Hamlet, in Act Three, scene four, there seems a contradiction in Hamlet's previous hesitation in killing Claudius, and his rash action in killing Polonius—who Hamlet believes is Claudius.
One of the major reasons Hamlet procrastinates in avenging his father's murder is because he does not know if the Ghost has given him honest information. Elizabethans believed in the supernatural completely; regarding ghosts, they believed that a ghost could not DO anything in the world after death, but could persuade those who still lived to act for them. If the Ghost is lying and Hamlet kills Claudius without good reason, Hamlet will lose his immortal soul—for killing a king is a mortal sin.
However, after the players reenact Old Hamlet's murder, and Claudius reacts so strongly at the sight, Hamlet has his proof. Walking through the castle after the play, he passes Claudius who appears to be bent in prayer. Hamlet contemplates murdering the King then, but realizes that if he does so, Claudius' soul will go straight to heaven with no sins weighing it down. This is one of Old Hamlet's greatest regrets in the way he died: he had no chance to clean his soul of his sins. Hamlet will not give Claudius this opportunity, and so he decides to wait.
However, when Hamlet finally goes to his mother's room, and there is a cry from behind the curtain (arras), Hamlet believes it is Claudius, there to act upon his incestuous marriage with Gertrude. (To marry an in-law after the death of one's spouse was considered incestuous at that time.) What better time to kill Claudius when he has this sin on his soul, and so he stabs the person behind the curtain. Unfortunately, it is Polonius, in a place where he does not belong— spying on Hamlet and Gertrude.
Hamlet has finally found a strength of purpose and the right circumstances to kill Claudius, but he kills the wrong man.