Changed var scope