Fix a bug in update_c