Editing table now deals with errors