Fixed some issues with detection of perimeter changes.