Fixed bug on activity based heuristic.