fixed bug in directory size management