Fix protocol close test