fixes for nginx proxy