Place the object in a variable before returning. This way private methods can access public members.