fixed problems with bit vector implementation