fixes static analyzer issues.

Fixes static analyzer issues.