Tweaks and a bugfix for when you navigate out of a form using the repeat dialog