Fix bug where detail views are not removed when reloading data