changed url params generation to avoid outputting () when empty params passed