fixed ambiguous situation during primary key insertion