fix top-level relation order; add a TODO