fixed negative indexes in zrange