fix bug in bit.c