Fixing relative ref paths