Fixed a bug in _update_coefficients