Bugfixes: data source for addmaterial/ insert command