reverted to old heuristic. commented out dyndeadlocks