fixed the bug for relative path finding