Final solution to the NoUri exception issue in references

This commit undoes most of the changes in the previous one