Fixed bug relating to picking correct building type from perimeter.