fixed binarize bug