fixed a serious bug in the uri class