Fix bugs Work on Xcode 6 beta 3