Fixed a bug with the way that the areas for pixel counting were being selected.