Fix bugs on Xcode6b5