fix nginx bugs