Build fix for scope leak