fixed the case where an index may not have a range key