cleanup for server