Fixes static analyzer warnings. Part 4