fix bug orphaned for directive, need further test