Solve cyclic references

Same here. Using id would be faster.