fixes for deletion and edit mode