Fixed bug with invalid URI's.