Fix expand_range