Fixed some bugs in the reverse proxy.