fix data insertion script