fixed directory bug