fixing URI parse issues from original repo #50
Merge pull request #71 from rickypai/master

fixing URI parse issues from original repo #50 courtesy of @sandmark