fix bug when using same config in many directives