Commit correct data to database.