fixing some heuristic stuff