Not related to this change, but shouldn't the wuery also include `$realm`?