fixed weird directory nesting bug