Fix termination condition
Further simplication
Resolve list of place IDs