fixing use of private ivar