Add test for error case in editing, fix