fix custom directives error.