fixed bad variable scoping