502 bad gateway error on submit