Added explicit typecasts for stat members.