Fix insert into database.