change server destroy function