fixed trying to add a row to a table when it's not present