Fix and add test for updating/adding a table row