Fix edit functionality. Breaks add.