Fixed deletion by properly updating json data.