fix server error when debug turn off