fix bug on target directory