fixing URI parse issues from original repo #50