small fixes in ranges