Fixes #2141 Fixes #2139
Previously range string is not validated against various combination of values. This patch fixes the issue. Fixes #2098
Fixes #2098