fixing error on new empty index