Fix some of the things clang --analyze flagged