fixed template usage
fixed regression test for recent Range changes