set proper index for directory block