Fixed 502 bad gateway bug (issue #13)