mean field works with nans