Change parsing of directives