a bug in assign mean-field occupation