Moved calculation of bitnum to after loading the data