fixed finding variables in compiled template