fixed lost directory bug