fix blackpixelcount