fixed a bug in bitset to string and a likely bug in getN