What would be ungrammatical. The sentence is simply ambiguous as it is. The "problem" is that English doesn't have a relative pronoun used exclusively to refer to an entire main clause.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.