Fix #491: handle correctly url without path for links