[BUGFIX] Ensure correct URL generation with http_build_query()