fixed 'empty' directories bug