How are you so sure that config->agent_type  is AGENT_TYPE_COMMON ?
Otherwise, this looks like a material change ...