fix for undefined `tr` reference