Fix to resolving relationships