Bug fix for form re-submissions that was most apparent with the maximum distance example