F: Fix scoping of variables