fix a bug in model and update util