fix nginx crash issue #681