fix server crash