Fix: "not null" fields were not set

This is a fix for the problem that there are database fields that aren't inserted, although they were defined as "not null". Under certain circumstances this leads to a non functional system.