How to prevent duplicated submissions