Fix namespaces and sanity check.