fix issue where only the first directive was shown