fix a bug in ProtocolTypeAccessor, same problems are in other Accessor. Need to fix later