fix bug in url without / end