fix closure variable reference