Fixed problem when reading 32 bits at once

See the issue I opened, this fixed the problem.

1 << N is 0 when N is equal to 32. You can either check on that case and set all bits to 1 or just cast to a long.