fixed Xcode analyzer issues