Use consistent variable in currentclass setter.

Using `name` interchangeably was indeed confusing.