better handling of empty subranges