fix directive scope