bugfix for data insertion.