prevent double dirs