Fixing bugs in BeaconViewController