remove trailing ampersand if params are empty