bugfix: li may add directory too