Fix error with repeated whitespace in directives