Fix the bug which is caused wrong top dir