Added some logic to disable repetition fields when necessary