bugfix in range_to_list