fix a bug in model/update