fixes following closure analysis