changed the default behaviour of the close method to remove the view instead of empty its content