fixed a bug with codesign of frameworks on XCode, fixed some bugs of uninitialized variables around