fix bug in get_recovery_plans when there are multiple plans
Remove debugging code