fixes a bug when deleting the entire survey that rendered the incorrect view