removal of the detail view when needed