fixing a bug when closing civikey (with the miniview hidden)