fixed size issue and wrong if expression
fixed bugs in bitio
fixe wrong value in bitio.c
fixed variable cleaning