fixed absolute path generation and moved it up before link delegation