" The sentence is now correct. "That" is a conjunction, not a relatiev pronoun. If the antecedent of a relative is en entire clause, "which" must be used: He had been living there for such a long time, which was known by everybody.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.