fix S-Boxes issue and clean solution