Fixed bug in descending ranges