How to stop form from being submitted twice?