He also said, in the same passage, that Peter was Satan.
Well no, he didn't say "You, Peter, are Satan." Sloppy reading makes for terrible theology. That explains your theology adequately.
Go after me, Satan.says the scripture. The words may signify, begone from me; but out of respect due to the expositions of the ancient fathers, who would have these words to signify come after me, or follow me, I have put, with the Rheims translation, go after me. Satan is the same as an adversary: and is here applied to Peter, however, unknowingly or innocently, raised an opposition against the will of God, against the glory of Jesus, against the redemption of mankind, and against the destruction of the devil's kingdom. He did not understand that there was nothing more glorious than to make of one's life a sacrifice to God.
Thou dost not, i.e. your judgement in this particular is not conformable with that of God. Hence our erring separated brethren conclude that Christ did not, in calling him the rock in the preceding verses, appoint him the solid and permanent foundation of his Church. This conclusion, however, is not true, because, as Saint Augustine, and many other ancient theologians, affirm Peter could fall into error in points regarding morals and facts, though not in defining or deciding on points of faith. Moreover, Saint Peter was not, as Saint Jerome says, appointed the pillar of the Church till after Christ's resurrection.
And it was not till the night before Christ suffered that he said to Peter: Behold, Satan has desired to have you; but I have prayed for you, that "your faith fail not," and you being once converted confirm your brethren. (Luke 22:31)