Fixed a bug in bit thresholder