Enable template with range

This fixes the issue #99.