fix directive bug