class variable bug