Fix issue #8: incorrect number of hist in subsearch