Fix integer decoding when it takes multiple reads