Are you sure?
Mat 27:50 Jesus, when he had cried again with a loud voice, yielded up the ghost.Note that the author, in writing after the fact, got a little ahead of himself in the telling and then added the clarification that this didn't happen until after Jesus' resurrection.
Mat 27:51 And, behold, the veil of the temple was rent in twain from the top to the bottom; and the earth did quake, and the rocks rent;
Mat 27:52 And the graves were opened; and many bodies of the saints which slept arose,
Mat 27:53 And came out of the graves after his resurrection, and went into the holy city, and appeared unto many.
Thanks for correcting me.