Fixed bug getting directive name