hopefully fixing case for 0 sized indexes