Fix template variable verification