fix for multiple ranges in a row