fix relations table