Fixed some static analyzer warnings.