ensure root query exists before set