fixed duplicate key error with change model