Fixes bad gateway error.