fix global ivar usage