Fix problems caused by lacking a primary key
Make name non null.