bug fix in setting pkg dir
,