Fixing uri parsing for whitespace and special characters