fixing directory index creation