Fixed a few static code analyzer warnings.