Fixed some issues with class variables instead of instance variables