fix uri handling