Fix JS validation not working on subsequent submissions