fix to check range count before getting ranges, closes #1237 (#1239)
fix to check range count before getting ranges, closes #1237 (#1239)


6174/slate,ianstormtaylor/slate,isubastiCadmus/slate,AlbertHilb/slate,ashutoshrishi/slate,ianstormtaylor/slate