502 Bad Gateway error shown after editing submission