Fix another use of className that could cause init order issues

Fixes #996.
Merge pull request #999 from realm/tg-classname

Fix another use of className that could cause init order issues