fixed issue with cap/truncate bit masking value overflowing when value length is set to 64 bits