Minor changes to avoid annoying warnings about data casting.