Fix return values in range operator
Fix broken template parsing