Make directives defensive