Fixed warnings from Xcode Analyzer