Fixes static analyzer warnings. Part 2