fix index weirdness