Can't assign to a variable from another scope