cleaning Details and Preview panels when it's necessary