Shadow variable warning fixes