Fixed a few analyzer warnings