fixed a crash bug 3.6.8