Fixed search space calculation.