fix bug related to repeating fields; closes #499