Fixing form submission success logic.