Fix scope

Fix issues with scope inside closures, no idea why these were not dying
on dev.