fix crash when deleting a viewed container