[bug] Adding uri to url only if necessary (related to issue #316)