ensure gen_server and clients terminate