fix one bug in purifyUnfaithBasis