Fix BitsInput to allow 31-bits for field size