Fix logic for non absolute links but links from root