Fixed the insertion to avoid PrimaryKey error