fixed a serious bug in bit planar