fixed heuristicsearch