Added a function to format URI and again fixed something.