Fixes #870 issue with double submit