Exactly. Galileo was originally on very good terms with the pope. Then the pope asked him to write a book comparing heliocentric and geocentric ideas from a neutral perspective. Galileo instead wrote a book ridiculing geocentrism, and had some things the pope said repeated by a character called "Simplico" ("Fool"). He insulted the pope, and that's where the trouble really started.