TG: Resolves bug of dir.

Signed-off-by: Michael Liang <ml09@inf.ufpr.br>