fix request URL generation