Fixing minor disclosing bug when flipping.
Fixing minor disclosing bug when flipping, test added.