Fix instance var access in classmethod