Changed bitmap lookup routine to fit in word size