More variable scope issues