Xrf fit

This will avoid catching the error in line 291.