fixed bunch of warnings by Xcode