fix add_params_to_uri() fragment bug

add_params_to_uri() ovewrites existing fragment when fragment parameter = true