fix the uri parsing bug