Fix templates relative lookup