Fixed bit difference issues

Note that an integer cannot hold 1024 bits.