Support more than four beacons.
Merge master.