Fix Bad Gateway 502 error