The impact of sulfate ions on the ion exchange of rare earth elements