Prevent form from being submitted twice