Fixed a bug in planner found with testCaseRandom.