save primary key plus messages fix