Fixed static analyzer warnings.