cleanup server helper