fixed error with duplicating a model record