Try to make removeIsolatedPixels better.