[FIX] fixed optimizations.get_ranges