fixed an issue with variable scoping in Class