Binarization and convolution bug fix