Fix protocol class reusing problem