A good friend of mine asked me how a pope can be infallible and yet do terrible things. If the Church takes back decisions a pope has made, how can that pope have been infallible?
Your friend suffers from a common misunderstanding about the Church’s teaching on infallibility. Papal infallibility is not a guarantee that popes will not make mistakes or even that they will not sin. It is simply a gift of the Holy Spirit whereby popes cannot err when definitively proclaiming doctrine on matters of faith and morals.