Fixed small bugs exposing the private member.