Fixed integer overflow bug due to bitwise operations on large integers using normal integers (using a std::bitset<128> now)