Precisely.
Here is an article[0] explaining papal infallibility that touches on some of these things in greater detail for those interested.
[0] http://edwardfeser.blogspot.com/2015/11/papal-fallibility.ht...