fix access to class fields