fix bug on lockdir...