fixing the row insertion into the tableview