bugfix for database insertions with new schemas