fix the sql+xml