fix bug: create wrong link when using relative path