various fixes for nginx