fixed issues to make it with latest Xcode 6.1