fix some tests & better heuristics