Fixed exception being thrown and URI string problem