Fix repeating fields

https://www.php-fusion.co.uk/forum/viewthread.php?thread_id=35349