fix server cleanup