Fixed analyzer warnings